package com.xinqi.modules.course.classmenu.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.course.classmenu.domain.ClassMenuEntity;
import com.xinqi.modules.course.classmenu.dto.req.ClassMenuCreateDTO;
import com.xinqi.modules.course.classmenu.dto.req.ClassMenuUpdateDTO;
import com.xinqi.modules.course.classmenu.dto.rsp.ClassMenuResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 课程中版块设置表转换
 *
 * @author: linkai
 * @date: 2023/10/25
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class ClassMenuConvert {
    public abstract ClassMenuEntity create(ClassMenuCreateDTO s);

    public abstract ClassMenuEntity update(ClassMenuUpdateDTO s, @MappingTarget ClassMenuEntity t);

    public abstract ClassMenuEntity update(ClassMenuUpdateDTO s);

    public abstract ClassMenuResultDTO convert(ClassMenuEntity s);
}
